#define MS_CLASS "Channel::Notifier"
// #define MS_LOG_DEV_LEVEL 3

#include "Channel/Notifier.hpp"
#include "Logger.hpp"
#include "iostream"

namespace Channel
{
	/* Class variables. */

	

	/* Static methods. */

	void Notifier::ClassInit()
	{
		MS_TRACE();

	}

	void Notifier::Emit(const std::string& targetId, const char* event)
	{
		MS_TRACE();



		json jsonNotification = json::object();

		jsonNotification["targetId"] = targetId;
		jsonNotification["event"]    = event;

		std::cout << jsonNotification.dump(4) << std::endl;
		// Notifier::channel->Send(jsonNotification);
	}

	void Notifier::Emit(const std::string& targetId, const char* event, json& data)
	{
		MS_TRACE();



		json jsonNotification = json::object();

		jsonNotification["targetId"] = targetId;
		jsonNotification["event"]    = event;
		jsonNotification["data"]     = data;

		std::cout << jsonNotification.dump(4) << std::endl;

		// Notifier::channel->Send(jsonNotification);
	}
} // namespace Channel
